package com.atguigu.springcloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RefreshScope
// 手动刷新
//curl -X POST "http://localhost:3355/actuator/refresh"
public class ConfigClient3366 {

    @Value("${config.info}")
    private String configInfo;
    @Value("${server.port}")
    private String serverPost;

    @GetMapping("/configInfo")
    public String configInfo(){
        return "serverPort"+serverPost+configInfo;
    }
}
